package fts.ftsmonitoring;

import java.util.Collection;


/**
 * @author Igor Zilberman (304033327) 
 * File monitoring service interface.
 * 
 * Responsible of monitoring several directories (recursive)
 *  with specified file wildcards for each directory
 * 	and notifying about changes made to files. 
 */
public interface IFileMonitoringService {
	/**
	 * @param roots Roots to monitor
	 * @throws InterruptedException
	 */
	public void startMonitoring(Collection<FileMonitoringRoot> roots) throws InterruptedException;
	/**
	 * Stop monitoring
	 */
	public void stopMonitoring();
	/**
	 * @param observer Observer to receive notifications
	 * 
	 * Register observer to receive notifications about file changes
	 */
	public void registerFileObserver(IFileObserver observer);
	/**
	 * @param observer Observer to stop receiving notifications
	 * 
	 * Unregister observer to stop receiving notifications about file changes
	 */
	public void unregisterFileObserver(IFileObserver observer);
	
	/**
	 * @return The status of the monitoring service
	 */
	public MonitoringStatus getStatus(); 
}
